package com.qf.rabbitmq.listeners;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MyListener {

    @RabbitListener(queues = "rspringboot")
    public void onMessage(String msg, Channel channel){
        System.err.println("spring 消费者收到了一条消息:" + msg);
    }

    @RabbitListener(queues = "xindefengbaoyijingchuxian")
    public void onMessagel(String msg){
        System.err.println("spring 消费者收到了一条消息:" + msg);

    }
}
